package cn.edu.nuc.fourth.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import cn.edu.nuc.fourth.model.Announce;

public interface AnnounceMapper {
	int deleteByPrimaryKey(Integer aid);

	/**
	 * 添加公告
	 * 
	 * @param record
	 * @return
	 */
	int insert(Announce record);

	/**
	 * 记录总数
	 * 
	 * @return
	 */
	public Integer count();

	/**
	 * 公告分页
	 * 
	 * @return
	 */
	public List<Announce> page(@Param("start") Integer start, @Param("offset") Integer offset);
	
	/**
	 * ajax实现滚动公告列表查询的list
	 * @param astate
	 * @return
	 */
	public List<Announce> findBystate(Integer astate);

	int insertSelective(Announce record);

	Announce selectByPrimaryKey(Integer aid);

	int updateByPrimaryKeySelective(Announce record);

	int updateByPrimaryKey(Announce record);
}